1 package com.imcode.db.benchmark;
2
3 import com.imcode.db.DatabaseCommand;
4 import com.imcode.db.DatabaseConnection;
5 import com.imcode.db.DatabaseException;
6
7 class BenchmarkDatabaseCommand implements DatabaseCommand {
8
9 private final DatabaseCommand databaseCommand;
10 private BenchmarkDatabase benchmarkDatabase;
11
12 BenchmarkDatabaseCommand(BenchmarkDatabase benchmarkDatabase, DatabaseCommand databaseCommand) {
13 this.benchmarkDatabase = benchmarkDatabase;
14 this.databaseCommand = databaseCommand;
15 }
16
17 public Object executeOn(final DatabaseConnection connection) throws DatabaseException {
18 return databaseCommand.executeOn(new BenchmarkDatabaseConnection(benchmarkDatabase, connection));
19 }
20
21 }